﻿namespace DotNetClient
{
    public enum PackageType: byte
    {
        PKG_MESSAGE = 1,
        PKG_HANDSHAKE = 2,
        PKG_HEARTBEAT = 3,
        PKG_HANDSHAKE_ACK = 4,
        PKG_KICK = 5
    }

    public class Package
    {
        public PackageType type;
        public byte[] body;

        public int length { get; }

        public Package(PackageType type, byte[] body)
        {
            this.type = type;
            this.body = body;
            this.length = body.Length;
        }
    }
}
